package biz

import "time"

// Score 定义成绩
type Score struct {
	ExamID           string  `gorm:"primaryKey;column:exam_id" json:"exam_id"`
	StudentID        string  `gorm:"primaryKey;column:student_id" json:"student_id"`
	ScoreCalculation float64 `gorm:"column:score_calculation" json:"score_calculation"`
	Exam             Exam    `gorm:"foreignKey:ExamID;references:ExamID" json:"exam"`
}

// ExamQuestion 定义试题结构体
type ExamQuestion struct {
	Question string   `json:"question"`
	Options  []string `json:"options"`
	Answer   string   `json:"answer"`
}

// Exam 定义考试结构体
type Exam struct {
	ExamID      string    `gorm:"type:string(11);not null;primaryKey;column:exam_id;comment:考试ID" json:"exam_id"`
	ExamName    string    `json:"exam_name" gorm:"comment:考试名称"`
	ExamTime    string    `json:"exam_time" gorm:"comment:考试时间"`
	ExamContent string    `json:"exam_content" gorm:"comment:考试内容"`
	CreatedAt   time.Time `json:"created_at" gorm:"comment:创建时间"`
	UpdatedAt   time.Time `json:"updated_at" gorm:"comment:更新时间"`
	TeacherID   string    `json:"teacher_id" gorm:"comment:教师ID"`
}
